﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:gd="clr-namespace:WickedFlame.GenDock">
    
    <Style TargetType="{x:Type gd:Anchor}">
        <!--<Setter Property="Orientation" Value="Vertical"/>-->
        <Setter Property="Margin" Value="1,0,1,0"/>
        <!--<Setter Property="BorderBrush" Value="DarkGray" />
        <Setter Property="BorderThickness" Value="1,1,1,1" />-->
        <Setter Property="Background" Value="{DynamicResource {ComponentResourceKey {x:Type gd:DockingLayoutManager}, {x:Static gd:GenDockBrushes.ContentBackgroundBrush}}}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type gd:Anchor}">
                    <Border
                        BorderThickness="1,1,1,1" 
						BorderBrush="DarkGray">
                        <Grid Background="{TemplateBinding Background}">
                            
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition />
                            </Grid.RowDefinitions>

                            
                            <!--<StackPanel Name="baseStackPanel"
                                        Orientation="Vertical"
                                        Grid.Column="0" Grid.Row="0"/>-->
                                <StackPanel Name="baseStackPanel" 
                                            Grid.Column="0" Grid.Row="0" Orientation="Vertical">
                                    <StackPanel.Resources>
                                        <Style TargetType="{x:Type gd:Anchor}">
                                            <Setter Property="LayoutTransform">
                                                <Setter.Value >
                                                    <RotateTransform Angle="90"/>
                                                </Setter.Value>
                                            </Setter>
                                            <Setter Property="Margin" Value="0,2,2,0"/>
                                        </Style>
                                        <Style TargetType="Border">
                                            <Setter Property="CornerRadius" Value="0,0,3,3"/>
                                        </Style>
                                    </StackPanel.Resources>
                                </StackPanel>

                                <ContentPresenter Grid.Column="0" Grid.Row="1" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    
    
</ResourceDictionary>